package com.kylin.dal.entity.commodity;

import com.kylin.shared.common.entity.BaseEntry;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 商品用户评价
 * @author Damon S.
 */
@EqualsAndHashCode(callSuper = true)
@Entity
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "t_commodity_comment", catalog = "db_kylin_artwork")
public final class CommentEntry extends BaseEntry implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long commentId;

    @Column private String avatar;

    @Column(name = "commodity_id", nullable = false)
    private Long commodityId;

    @Column(name = "display_name")
    private String displayName;

    @Column(name = "user_id", nullable = false)
    private Long userId;

    @Column(columnDefinition = "BIT", nullable = false)
    private Integer removed;

    @Column(columnDefinition = "TEXT")
    private String content;
}
